1. Field of the Invention
The present invention relates to image processing apparatuses and methods in which luminance values of input images are converted for output.
2. Description of the Related Art
In recent years, large screen flat display devices such as plasma displays, liquid crystal displays, rear projection displays, and the like have become widespread.
Generally, since limitations occur in the range of luminance levels for reproducible images (dynamic range) in these display devices due to characteristics of individual display devices, it is common for processing to be carried out for outputting of images in which contrast is emphasized within the limited dynamic range.
Histogram flattening is known as a typical processing technique. Specific description is given of basic processing techniques in histogram flattening using the following diagrams.
FIG. 1 is a diagram for describing basic processing techniques in histogram flattening. In FIG. 1, the horizontal axis indicates an input luminance level and the vertical axis indicates a number of pixels. Here, xmin indicates a smallest input luminance level and xmax indicates a largest input luminance level.
Furthermore, H(x) shown on the vertical axis is a luminance histogram indicating a number of pixels appearing of the input luminance level x. And C(x) shown as a dotted line is a cumulative luminance histogram up to the input luminance level x. It should be noted that a relationship between the luminance histogram and the cumulative luminance histogram can be expressed by formula (1).
                              C          ⁡                      (            x            )                          =                              ∑                          i              =              0                        x                    ⁢                      H            ⁡                          (              i              )                                                          (        1        )            
Here, a smallest output luminance level is given as x′min and a largest output luminance level is given as x′max. And the vertical axis of the cumulative luminance histogram C (x) is normalized to C(Xmin)=x′min and C(xmax)=x′max. FIG. 2 shows a function C′(x) in which the cumulative luminance histogram is normalized. C′(x) shall be called a histogram flattening function.
When a luminance level numeral is given as L, a relationship between C(x) and C′(x) is shown by formula (2).
                                          C            ′                    ⁡                      (            x            )                          =                              (                                          C                ⁡                                  (                  x                  )                                            -                              C                ⁡                                  (                                      x                    min                                    )                                                      )                    ⁢                                    L              -              1                                                      C                ⁡                                  (                                      L                    -                    1                                    )                                            -                              C                ⁡                                  (                                      x                    min                                    )                                                                                        (        2        )            
Histogram flattening refers to a process by which input luminance levels are converted using the histogram flattening function C′(x) that is calculated as shown above, and after this processing it is possible to obtain an output image in which the frequency distribution of luminance levels have become uniform.
Generally since each luminance level is used uniformly in histogram flattening, conversion can be achieved to images having rich tone expression in which contrast is emphasized as a whole. On the other hand, excessive contrast is emphasized when there is a large disparity in the frequency distribution of the input luminance levels, which may result in the output of an unnatural image.
For this reason, in picture quality correction circuits, such as that disclosed in Japanese Patent Application Laid-Open No. 2001-125535 for example, picture quality deterioration due to excessive emphasis of contrast is suppressed by carrying out a picture quality correction process in which a limit is set on the number of appearances for the respective input luminance levels and distribution of extreme characteristic points is suppressed.
However, with conventional histogram flattening, the histogram flattening has been carried out based on a histogram of the image of the entire screen, and therefore there has been a problem of tone expression deteriorating in some areas. For example, when the histogram of an entire screen favors bright areas, partial regions having a low luminance level within the screen end up being converted to a very low luminance level, thus resulting in a problem that partial darkish regions become all black.
Also, conversely, when the histogram of an entire screen favors dark areas, partial regions having a high luminance level within the screen end up being converted to a very high luminance level, thus resulting in a problem that partially bright regions become all white.